﻿using Funq;
using ServiceStack;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Power
{
    public class AppHost : AppHostHttpListenerSmartPoolBase
    {
        public AppHost()
            : base("app", typeof(AppHost).Assembly)
        {
            MinThreads = 3;
            MaxThreads = 12;

        }
        
        public override void Configure(Container container)
        {
           
            HostConfig conf = new HostConfig();
            conf.DebugMode = true;
            
            string phypath = AppDomain.CurrentDomain.SetupInformation.ApplicationBase + "\\Resources\\map";
            System.IO.Directory.CreateDirectory(phypath);
           
            conf.WebHostPhysicalPath = phypath;
            SetConfig(conf);
        }
    }

}
